<?php
/* @var $this OptionsController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'网站设置',
);

$this->menu=array(
	array('label'=>'新增设置', 'url'=>array('create')),
	array('label'=>'网站设置', 'url'=>array('admin')),
);
?>
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
    <ul class="breadcrumb">
        <li><i class="ace-icon fa fa-home home-icon"></i><a href="<?=$this->createUrl('default/index')?>">首页</a></li>
        <li><a href="<?=$this->createUrl('options/custom')?>">自定义设置</a></li>
        <li class="active">新增</li>
    </ul><!-- /.breadcrumb -->
    <div class="nav-search" id="nav-search">
        <form class="form-search">
            <span class="input-icon">
                <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
                <i class="ace-icon fa fa-search nav-search-icon"></i>
            </span>
        </form>
    </div><!-- /.nav-search -->
</div><!-- /.breadcrumbs -->
<div class="page-content">
    <div class="page-header">
        <h1>创建自定义设置
            <small><i class="ace-icon fa fa-angle-double-right"></i> Create Custom</small>
        </h1>
    </div><!-- /.page-header -->
    <div class="row">
        <div class="col-xs-12">

            <!-- PAGE CONTENT BEGINS -->
            <?php $form = $this->beginWidget('CActiveForm', array(
                'id'=>'myForm',
                'enableAjaxValidation'=>true,
                'enableClientValidation'=>true,
                //'focus'=>array($model,'website_title'),
                'htmlOptions'=>array('class'=>'form-horizontal'),
            )); ?>
            <?php echo $form->errorSummary($model); ?>
            <div class="form-group">
                <label class="col-sm-2 control-label">字段类型 <span class="text-danger">*</span></label>
                <div class="col-sm-8">
                    <select id="options-input_type" class="form-control" name="Options[type]" aria-required="true">
                        <option value="">请选择</option>
                        <option value="0">系统</option>
                        <option value="1" selected>自定义</option>
                        <option value="2">模型</option>
                    </select>
                </div>
                <div class="col-sm-2">
                    <span class='tips'><i class='fa fa-info-circle'></i> 系统：系统设置|自定义：自定义设置|模型：模型属性 </span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">名称 <span class="text-danger">*</span></label>
                <div class="col-sm-8">
                    <input type="text" id="options-name" name="Options[name]" class="form-control" aria-required="true" value="">
                </div>
                <div class="col-sm-2">
                    <span class='tips'><i class='fa fa-info-circle'></i> 例如：qq </span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">输入框类型 <span class="text-danger">*</span></label>
                <div class="col-sm-8">
                    <select id="options-input_type" class="form-control" name="Options[input_type]" aria-required="true">
                        <option value="">请选择</option>
                        <option value="1" selected>input</option>
                        <option value="2">textarea</option>
                        <option value="3">ueditor</option>
                        <option value="4">image</option>
                    </select>
                </div>
                <div class="col-sm-2">
                    <span class='tips'><i class='fa fa-info-circle'></i> </span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">提示</label>
                <div class="col-sm-8">
                    <input type="text" name="Options[tips]" class="form-control" value="">
                </div>
                <div class="col-sm-2">
                    <span class='tips'><i class='fa fa-info-circle'></i> 例如：QQ号码 </span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">自动加载 <span class="text-danger">*</span></label>
                <div class="col-sm-8">
                    <select id="options-autoload" class="form-control" name="Options[autoload]" aria-required="true">
                        <option value="">请选择</option>
                        <option value="1" selected>是</option>
                        <option value="0">否</option>
                    </select>
                </div>
                <div class="col-sm-2">
                    <span class='tips'><i class='fa fa-info-circle'></i> </span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">值 <span class="text-danger">*</span></label>
                <div class="col-sm-8">
                    <input type="text" name="Options[value]" class="form-control" value="">
                </div>
                <div class="col-sm-2">
                    <span class='tips'><i class='fa fa-info-circle'></i> 例如：16984431 </span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">排序</label>
                <div class="col-sm-8">
                    <input type="text" name="Options[sort]" class="form-control" value="0">
                </div>
                <div class="col-sm-2">
                    <span class='tips'><i class='fa fa-info-circle'></i> 默认0 </span>
                </div>
            </div>

            <div class="hr hr-18 dotted"></div>
            <div class="clearfix">
                <div class="col-md-offset-2 col-md-10">
                    <button class="btn btn-white btn-info btn-round" type="submit"><i class="ace-icon fa fa-floppy-o bigger-120 blue"></i>保存</button>
                    &nbsp;
                    <button class="btn btn-white btn-default btn-round" type="reset"><i class="ace-icon fa fa-times red2"></i>取消</button>
                </div>
            </div>
            <?php $this->endWidget(); ?>
            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</div><!-- /.page-content -->


